package login;

import util.InputUtil;
import view.BuyGoodView;
import view.OrderSelect;
import view.RankGood;

/**
 * @classname:cashier
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/31 16:34
 * @version: 0.1
 * @since:1.8
 */

public class Cashier {
    public Cashier() {
    }


    public static void showMethod() {
        System.out.println("请选择要管理的模块1.购买管理 2.订单查询 3.排行和统计 4.返回登陆页面");
        int num = InputUtil.inputInt();
        switch (num) {
            case 1:
                BuyGoodView.start();
                break;
            case 2:
                OrderSelect.selectMemberOrGood();
                break;
            case 3:
                RankGood.rankgoodInfo();
                break;
            case 4:
                Index.login();
                break;
        }
        continues();
    }


    private static void continues() {
        System.out.println("是否继续本功能模块返回登录1/0");
        int i = InputUtil.inputInt();
        if (i == 1) {
            showMethod();
        } else {
            Index.login();
        }
    }

}
